<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>后盾人</title>
  </head>
  <body></body>
  <script>
    // let arr = ["后盾人", "houdunren.com"];
    // let [a, b, c = "hdcms"] = arr;
    // console.log(a, b, c);

    // let user = { name: "后盾人", url: "houdunren.com", title: "开源系统" };
    // let { url, name, title = "hdcms" } = user;
    // console.log(name, url, title);
    //DOM Node
    function createElement(options = {}) {
      let { width = 200, height = 100, backgroundColor = "red" } = options;
      // console.log(width, height, backgroundColor);
      const div = document.createElement("div");
      div.style.width = width + "px";
      div.style.height = height + "px";
      div.style.backgroundColor = backgroundColor;
      document.body.appendChild(div);
    }
    createElement({ width: 60, height: 30, backgroundColor: "green" });
  </script>
</html>
